package com.vclee.fast;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import com.vclee.fast.integration.imserver.ImServer;

@SpringBootApplication
public class WebApplication {
    public static ConfigurableApplicationContext context;

    private static Integer imPort;

    @Value("${custom.im-port:8050}")
    public void setImPort(Integer imPort) {
        WebApplication.imPort = imPort;
    }

    public static void main(String[] args) {
        context = SpringApplication.run(WebApplication.class, args);
        new ImServer(imPort).start(); // 开启一个端口作为webSocket连接端口
    }

}